<template>
  <el-container style="min-height: 100vh">

    <el-aside :width="isCollapsed ? '64px':'200px'" style="box-shadow: 2px 0 6px rgb(0 21 41 / 35%);">
      <vaside @toggleCollapse="getmsg"/>
    </el-aside>

    <el-container>
      <el-header style="border-bottom: 1px solid #ccc;">
        <vheader  :user="user" />
      </el-header>

      <el-main>
        <!--        表示当前页面的子路由会在 <router-view /> 里面展示-->
        <router-view />
      </el-main>

    </el-container>
  </el-container>
</template>

<script>

import vaside from "@/components/vaside"
import vheader from "@/components/vheader"
import request from "@/utils/request";

export default {
  name: 'manage',
  data() {
    return {
      sideWidth: 200,
      isCollapsed:false,
      user: localStorage.getItem("user") ? JSON.parse(localStorage.getItem("user")) : {}
    }
  },
  components: {
    vaside,
    vheader
  },
  methods: {
    getmsg(isCollapsed) {
      this.isCollapsed = isCollapsed;
      console.log(isCollapsed);
    }
  }
}

</script>
<style>

</style>
